package com.pyk.controller;


import com.pyk.entity.Result;
import com.pyk.entity.Test;
import com.pyk.service.TestService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Slf4j
@RestController
@RequestMapping("/exams")
public class TestController {

    @Autowired
    private TestService testService;

    @GetMapping
    public Result list(){
        log.info("查询所有考试");
        List<Test> testList = testService.list();
        return Result.success();
    }


}
